package cn.new18.testactivitytask.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import cn.new18.testactivitytask.bFragment.FragA;
import cn.new18.testactivitytask.bFragment.FragB;
import cn.new18.testactivitytask.bFragment.FragC;
import cn.new18.testactivitytask.bFragment.FragD;


/**
 * Created by RaoWei on 2016/11/22 15:10.
 */

public class BFragFragAapter extends FragmentPagerAdapter {
    private String[] mTabs= new String[]{"fraga", "fragb", "fragc", "fragd"};
    private Fragment[] mFragments = new Fragment[]{FragA.getInstance(), FragB.getInstance(), FragC.getInstance(), FragD.getInstance()};
    public BFragFragAapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments[position];
    }

    @Override
    public int getCount() {
        return mTabs.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTabs[position];
    }
}
